current_prolog_flag(argv,L),nth1(2,L,FILE), [FILE].
current_prolog_flag(argv,L),nth1(3,L,FILE), [FILE].
current_prolog_flag(argv,L),nth1(4,L,FILE), [FILE].

['framework/base.pl'].
['framework/ca.pl'].
['framework/transition.pl'].
['framework/printmessages.pl'].

step(S,R,X),not(transvalid(S,R,X)),tell(user_error),print('*** Not a valid transition!\n'),printdeterms(S,R,X),halt(3).

step(S,R,X),not(transvalid(S,R,X)),halt(3).

%not(hasproperty(_,_,_)),print('hasproperty(_,_,_) :- fail.\n').
forall(hasproperty2(A,B,C),(print('hasproperty('),print(A),print(','),print(B),print(','),print(C),print(').\n'))).

print('\n').

step(S,R,X),findall(A,knows(A,_),LSTA), list_to_set([S|[R|LSTA]],SETA), assert(actorl(SETA)).

step(S,R,X),actorl(SETA),forall(member(A,SETA),(findall(M,knowp(A,(S,R,X),M),LSTM),list_to_set(LSTM,SETM),
                                    forall(member(M,SETM),(print('knows('),printt(A),print(','),printt(M),print(').\n'))))).


telling(X),tell(user_error),print('Trace validation succeeded!\n'),tell(X).
